import {
  PROGRAMLIST,
  PROGRAMADD,
  UPDATEPROGRAM,
  PROGRAMDEL,
  FINDPROGRAM,
  RELEASEPROGRAM,
  DELLISTPROGRAM,
  ONEPROGRAM,
    PREVIEWID,
    RELEASE
} from "./api";
import { METHOD, request } from "@/utils/request";

//节目列表
export function list(params) {
  return request(PROGRAMLIST, METHOD.GET, params);
}

//增加节目
export function add(params) {
  return request(PROGRAMADD, METHOD.POST, params);
}
//删除节目
export function del(params) {
  return request(PROGRAMDEL, METHOD.POST, params);
}
//编辑节目
export function update(params) {
  return request(UPDATEPROGRAM, METHOD.POST, params);
}
//预览
export function preview(params) {
  return request(`${PREVIEWID}/${params}`, METHOD.GET);
}
//节目详情
export function detailById(params) {
  return request(`${ONEPROGRAM}/${params}`, METHOD.GET);
}
//重新下发
export function republish(params) {
  return request(RELEASE, METHOD.GET, params);
}

//批量删除设备
export function delList(params) {
  return request(DELLISTPROGRAM, METHOD.POST, params);
}
//编辑节目单
export function findById(params) {
  return request(FINDPROGRAM, METHOD.GET, params);
}
//发布节目单
export function release(params) {
  return request(RELEASEPROGRAM, METHOD.GET, params);
}

